/**
 * @author 07509-Chang Shengwei
 * @version Id: JavaVMStackOF.java, v 0.1 2021/8/24 21:28  Shengwei Exp $
 * @Description
 */
public class JavaVMStackOF {
    private static int stackLength = 0;

    private static void test() {
        long unused1;
        stackLength++;
        test();
    }

    public static void main(String[] args) {
        try {

            test();
        } catch (Error e){
            System.out.println("stack length: " + stackLength);
            throw e;
        }
    }

}
    